import java.util.Date;


public class Begruessung
{
	String name;
	
	public Begruessung(String n)
	{
		name = n;
	}
	
	public void gruss()
	{
		Date d = new Date(System.currentTimeMillis());
		int hour = d.getHours();
		
		if(hour < 12)
		{
			System.out.println("Guten Morgen " + name);
		}
		else if(hour < 18)
		{
			System.out.println("Guten Tag " + name);
		}
		else
		{
			System.out.println("Guten Abend " + name);
		}
		
	}
}
